import { defineStore } from 'pinia'

interface walletStoreKey {
    isConnected: boolean,
    address: string,
    chainId: number
    status: string
    message: string
    connectWallet: (callback: () => void) => void
    disconnectWallet: () => void
    SignMessage: (msg: string, callback: () => void) => void
}

export const walletStore = defineStore('wallet', {
    state: (): walletStoreKey => ({
        isConnected: false,
        address: '',
        chainId: 0,
        status: 'disconnected',
        message: '',
        connectWallet: () => { },
        disconnectWallet: () => { },
        SignMessage: () => { }
    }),
    getters: {
    },
    actions: {
    }
})